package com.yicong.ants.mvp.libconfig;

import android.content.Context;
import androidx.databinding.DataBindingUtil;
import android.view.LayoutInflater;
import android.view.ViewGroup;

import com.cchao.simplelib.ui.interfaces.impl.DefaultTitleBarDelegate;
import com.yicong.ants.R;
import com.yicong.ants.databinding.GeneralTitleBarBinding;

/**
 * @author cchao
 * @version 2019-04-29.
 */
public class ZsTitleBarDelegate extends DefaultTitleBarDelegate {
    public ZsTitleBarDelegate(Context context, ViewGroup parent) {
        super(context, parent);
    }

    /**
     * 复写自定义样式
     *
     * @param parent
     */
    @Override
    public void initTitleStyleBar(ViewGroup parent) {
        GeneralTitleBarBinding binding = DataBindingUtil.inflate(LayoutInflater.from(mContext)
            , R.layout.general_title_bar, parent, false);
        mTitleBar = binding.getRoot();
        mTitleBarTitle = binding.title;
        mTitleBarBack = binding.back;
        mTitleBarActionGroup = binding.actionGroup;
    }
}
